<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/5/19 0019
 * Time: 下午 14:54
 */

namespace Apps\Common\Models;



use Phalcon\Mvc\Model;
use Phalcon\Mvc\Model\Behavior\SoftDelete;

class BaseModel extends Model
{

    const DELETED = "Y";

    const NOT_DELETED = "N";

    public function initialize()
    {
        $this->addBehavior(
            new SoftDelete(
                [
                    "field" => "is_delete",
                    "value" => BaseModel::DELETED,
                ]
            )
        );
    }

}